<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>WebSSH</title>
    <link rel="stylesheet" href="../css/xterm.css"/>
    <script src="../js/xterm.js"></script>
    <script src="../js/webssh.js"></script>
</head>
<body>
<div id="terminal"></div>
<button onclick="send()">查询系统架构</button>
<button onclick="clean()">清空控制台</button>
<script>
  let options = {
    //这里的内容可以写死，但是要整合到项目中时，需要通过参数的方式传入，可以动态连接某个终端。
    operate: 'connect',
    host: '192.168.1.60',
    port: '22',
    username: 'root',
    password: ''
  };

  let client = new WSSHClient(options);

  function send() {
    client.sendClientData("uname -a\r")
  }
  function clean() {
    console.log("点击了")
    // client.sendClientData("clear\r")
    client.clear()
  }
</script>
</body>
</html>